<head>
<link rel="stylesheet" type="text/css" href="/stylesheets/ajax.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
</head>


<script>	
	function myAjaxCallJq() {
		$.ajax({
			url: "/test",
			  data: {
			    id: 97201
			  },
			  success: function( data ) {
			    $( "#div1" ).html( "<strong>" + data + "</strong> degrees" ).show();
			  }
		});
	}


	function hardcoreAjax() {

	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
	  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  	}

	xmlhttp.onreadystatechange=function()	{

  		if (xmlhttp.readyState==4 && xmlhttp.status==200)
    	{	
    		document.getElementById("div1").innerHTML=xmlhttp.responseText;
    	}
  	}

	xmlhttp.open("GET","/test?id=3.14159265359",true);
	xmlhttp.send();
}
	

</script>

<body>

<center><h1>Test AJAX with EJS</h1></center>
<center><button type="button" onclick="hardcoreAjax()">Ajax Call!</button></center>
<center><div id="div1"></div></center>

</body>